<template>
  <div class="rightBodyContent">
    <div class="rightBodyContent-in">
      <el-tabs v-model="activeName" type="card" @tab-click="getChangeFn()">
        <el-tab-pane label="健康申报" name="1"></el-tab-pane>
        <el-tab-pane label="离厦申报" name="2"></el-tab-pane>
      </el-tabs>
      <el-tabs v-model="userstype" type="card">
        <el-tab-pane label="家长申报" name="1"></el-tab-pane>
        <el-tab-pane label="职工申报" name="2"></el-tab-pane>
      </el-tabs>
      <daily v-if="activeName=='1'" :userstype="userstype"></daily>
      <leave v-if="activeName=='2'" :userstype="userstype"></leave>
    </div>
  </div>
</template>

<script>
import daily from "./Daily/index"
import leave from "./leave/index"

export default {
  components: {
    daily,
    leave
  },
  data() {
    return {
      activeName: '1',
      old_activeName: '1',
      userstype: '1'
    }
  },
  created() {
  },
  methods: {
    getChangeFn() {
      if (this.old_activeName !== this.activeName) {
        this.old_activeName = this.activeName;
        this.userstype = '1';
        console.log(this.activeName)
      }
    }
  },
  mounted() {
  },
}
</script>
<style scoped>
</style>
